package service.myservice.impl;

import java.util.HashMap;
import java.util.Map;

import service.myservice.PanduanService;
import service.vo.MessageVO;

public class PanduanServiceImpl implements PanduanService {

	@Override
	public Map<String, MessageVO> panduan(String userName) {
		boolean b = this.isUser(userName);
		MessageVO vo = new MessageVO();
		Map<String, MessageVO> map = new HashMap<String, MessageVO>();
		if(b){
			vo.setMess("成功");
			vo.setName(userName);
			map.put("/view/success.jsp", vo);
		}else {
			vo.setMess("失败");
			vo.setName(userName);
			map.put("/view/fail.jsp", vo);
		}		
		return map;
	}
	
	private boolean isUser(String userName){
		boolean b = false;
		if(userName.equals("hhh")){
			b = true;
		}
		return b;
	}

}
